home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 22 / Cream of the Crop 22.iso / program / eflibpt4.zip / DEMO / TESTING / MEM2.PAS < prev    next >
Pascal/Delphi Source File  |  1996-07-21  |  773b  |  26 lines

  1. { Borland Pascal Extended Function Library - EFLIB (C) Johan Larsson, 1996
  2.   Testing; accessing memory allocations
  3.  
  4.   EFLIB IS PROTECTED BY THE COPYRIGHT LAW AND MAY NOT BE COPIED, SOLD OR
  5.   MANIPULATED. FOR MORE INFORMATION, SEE PROGRAM MANUAL! THIS DEMONSTRAT-
  6.   ION PROGRAM MAY FREELY BE USED AND DISTRIBUTED.                          }
  7.  
  8.  
  9. uses EFLIBMEM;
  10.  
  11. var Data : AllocationObjectType;
  12.     String1, String2 : string;
  13.  
  14.  
  15. begin
  16.      String1 := 'It seems to work.';
  17.      String2 := 'It doesn''t work properly!';
  18.  
  19.      with Data do begin
  20.           Initialize (SizeOf(String1));
  21.           Move (String1, DataPointer(0)^, DataSize);
  22.           Move (DataPointer(0)^, String2, DataSize);
  23.           WriteLn (String2);
  24.           Intercept;
  25.      end;
  26. end.